org.eclipse.team.core.sync
Class RemoteSyncElement
java.lang.Object
org.eclipse.team.core.sync.LocalSyncElement
org.eclipse.team.core.sync.RemoteSyncElement
- All Implemented Interfaces:
- ILocalSyncElement, IRemoteSyncElement
- public abstract class RemoteSyncElement
- extends LocalSyncElement
- implements IRemoteSyncElement
Note: This class/interface is part of an interim API that is still under
development and expected to change significantly before reaching stability.
It is being made available at this early stage to solicit feedback from pioneering
adopters on the understanding that any code that uses this API will almost
certainly be broken (repeatedly) as the API evolves.
A standard abstract class that provides implementations for interesting
IRemoteSyncElement
methods. The members
method
provided will create a unified tree based on the local, base, and remote
children. The getSyncKind
method will calculate the relative
sync kind of the remote node.
- Since:
- 2.0
Fields inherited from interface org.eclipse.team.core.sync.ILocalSyncElement |
ADDITION, AUTOMERGE_CONFLICT, CHANGE, CHANGE_MASK, CONFLICTING, DELETION, DIRECTION_MASK, GRANULARITY_CONTENTS, GRANULARITY_CONTENTS_IGNORE_WHITESPACE, GRANULARITY_TIMESTAMP, IN_SYNC, INCOMING, MANUAL_CONFLICT, OUTGOING, PSEUDO_CONFLICT |
Method Summary |
protected boolean |
compare(int granularity,
boolean force,
IRemoteResource e1,
IRemoteResource e2,
IProgressMonitor monitor)
|
protected boolean |
compare(int granularity,
boolean force,
IResource e1,
IRemoteResource e2,
IProgressMonitor monitor)
Helper methods for comparisons that returns true if the resource contents are the same. |
abstract IRemoteSyncElement |
create(boolean isThreeWay,
IResource local,
IRemoteResource base,
IRemoteResource remote,
Object data)
Creates a client specific sync element from a local, base, and
remote resources. |
int |
getSyncKind(int granularity,
IProgressMonitor progress)
Performs a synchronization calculation on the given element based on the local and base
resources. |
protected boolean |
isGranularityContents(int granularity)
|
static String |
kindToString(int kind)
|
ILocalSyncElement[] |
members(IProgressMonitor progress)
Answers and array of ILocalSyncElement elements that are immediate
children of this sync element, in no particular order. |
protected abstract boolean |
timestampEquals(IRemoteResource e1,
IRemoteResource e2)
|
protected abstract boolean |
timestampEquals(IResource e1,
IRemoteResource e2)
|
String |
toString()
|
RemoteSyncElement
public RemoteSyncElement()
create
public abstract IRemoteSyncElement create(boolean isThreeWay,
IResource local,
IRemoteResource base,
IRemoteResource remote,
Object data)
- Creates a client specific sync element from a local, base, and
remote resources. The base and remote resource may be
null
.
- Parameters:
local
- the local resource in the workbench. Will never be null
.base
- the base resource, may me null
.remote
- the remote resource, may be null
.data
- client specific data.
- Returns:
- a client specific sync element.
members
public ILocalSyncElement[] members(IProgressMonitor progress)
throws TeamException
- Description copied from interface:
ILocalSyncElement
- Answers and array of
ILocalSyncElement
elements that are immediate
children of this sync element, in no particular order. The returned sync nodes are
a combination of the nodes represented by the sync element (e.g. local, base, remote).
- Specified by:
members
in interface ILocalSyncElement
- Overrides:
members
in class LocalSyncElement
- Throws:
TeamException
getSyncKind
public int getSyncKind(int granularity,
IProgressMonitor progress)
- Description copied from interface:
ILocalSyncElement
- Performs a synchronization calculation on the given element based on the local and base
resources. Returns an integer describing the synchronization state of this element.
- Specified by:
getSyncKind
in interface ILocalSyncElement
- Overrides:
getSyncKind
in class LocalSyncElement
compare
protected boolean compare(int granularity,
boolean force,
IResource e1,
IRemoteResource e2,
IProgressMonitor monitor)
- Helper methods for comparisons that returns true if the resource contents are the same.
If timestampDiff is true then the timestamps don't differ and there's no point checking the
contents.
compare
protected boolean compare(int granularity,
boolean force,
IRemoteResource e1,
IRemoteResource e2,
IProgressMonitor monitor)
timestampEquals
protected abstract boolean timestampEquals(IResource e1,
IRemoteResource e2)
timestampEquals
protected abstract boolean timestampEquals(IRemoteResource e1,
IRemoteResource e2)
isGranularityContents
protected boolean isGranularityContents(int granularity)
toString
public String toString()
kindToString
public static String kindToString(int kind)
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.